package com.kylin.domain.order.provider;

import com.kylin.domain.order.command.PlaceOrderCommand;
import com.kylin.shared.common.FunctionProvider;
import lombok.extern.slf4j.Slf4j;
import org.axonframework.commandhandling.gateway.CommandGateway;
import org.axonframework.eventhandling.gateway.EventGateway;
import org.axonframework.queryhandling.QueryGateway;
import org.springframework.stereotype.Component;

/**
 * 订单功能服务
 * @author Damon S.
 * @version v1.0.1
 * @date 2021年01月01日 17:47
 */
@Slf4j
@Component
public final class OrderProvider extends FunctionProvider {

    public OrderProvider(QueryGateway queryGateway,
                         CommandGateway commandGateway,
                         EventGateway eventGateway) {
        super(queryGateway, commandGateway, eventGateway);
    }

    public Long placeOrder(PlaceOrderCommand command) {
        return this.sendCommand(command);
    }

    public void queryOrders() {

    }

    public void findOrder() {

    }
}
